<template>
	<!-- 创店-活动详情-任务答题-已提交 -->
	<view class="answerSheet">
		<view class="content">
			<view class="answer" v-for="(item, index) in formFieldList">
				<view class="answer_num">{{index < 9 ? '0' + (index + 1) : index+1}}</view>
				<view class="answer_title">{{item.label}}
					<view v-if="item.tag == 'el-upload'">
						<image class="answer_title_image" :src="item.defaultValue" mode="aspectFill"></image>
					</view>
					<view v-else class="answer_title_">{{item.defaultValue}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// menuButtonInfo: {
				// 	top: 25
				// },
				activityIDList: [],
				formFieldList: []
			}
		},
		onLoad(param) {
			this.init(param)
		},
		methods: {
			init(param) {
				// // #ifndef H5 || APP-PLUS || MP-ALIPAY
				// this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
				// // #endif
				
				console.log("参数", param)
				
				this.$apis.activity(
					param.activityId
				).then(res => {
					this.activityIDList = res.data
					this.formFieldList = res.data.utilItemList[param.index].formFieldList
					
					let utilItemName = res.data.utilItemList[param.index].utilItemName
					uni.setNavigationBarTitle({
						title: utilItemName
					})
					console.log("表单数据", this.formFieldList)
					console.log("活动数据", this.activityIDList)
				})
			},
			goNavigateBack() {
				uni.navigateBack()
			},
		}
	}
</script>

<style>
	.answerSheet{
		width: 750rpx;
		overflow-x: hidden;
	}
.bg_top{
		width: 750rpx;
		background-color: #ffffff;
		position: fixed;
		z-index: 9;
	}
	.z_index{
		z-index: 10;
	}
	.top{
		width: 750rpx;
		height: 48rpx;
		background-color: #FFFFFF;
		position: fixed;
		padding-bottom: 20rpx;
	}
	.top_icon{
		margin-left: 32rpx;
		display: inline-block;
	}
	.top_title{
		position: absolute;
		font-size:34rpx;
		font-weight: 500;
		line-height: 48rpx;
		display: inline-block;
		left: 50%;
		transform: translate(-50%);
	}
	.content{
		margin: 40rpx 40rpx 250rpx 40rpx;
	}
	.answer{
		vertical-align: top;
		margin-bottom: 64rpx;
	}
	.answer_num{
		width: 48rpx;
		height: 40rpx;
		display: inline-block;
		color: #909499;
		font-size: 32rpx;
		font-weight: 700;
		position: relative;
		margin-right: 12rpx;
		vertical-align: top;
	}
	.answer_title{
		width: 610rpx;
		font-size: 30rpx;
		font-weight: 700;
		color: #2d3034;
		display: inline-block;
	}
	.answer_title_{
		margin-top: 10rpx;
		color: #2d3034;
		font-size: 30rpx;
		font-weight: 400;
	}
	.answer_title_image{
		margin-top: 10rpx;
		font-size: 0;
		width: 610rpx;
		border-radius: 12rpx;
	}
</style>
